-
Notifications
You must be signed in to change notification settings - Fork 2.2k
tests/int: use run -N|! for runc
#4946
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
CI failure in almalinux9 is a known flake #4437. Restarted. |
|
Now we do: runc start foo
[ $status -eq 0 ]and With this PR, we now do runc -0 start fooI.e. we still hide The alternative to that is use run explicitly: run -0 runc start fooI am open to any suggestions. |
1. Add status check support (same as in bats' run helper). 2. Add RUNC_PRE_CMD support (so we can use commands like taskset or timeout). 3. Drop sane_helper since the output of the command is shown in case of an error, and we show the command itself in runc wrapper (unless -N or ! is provided -- in this case the command is shown by bats, together with the error). This does not show the output of successful commands which IMO is a net positive since we are almost always interested in failed command output only. 4. Use the new functionality in cpu_affinity.bats and start.bats as a showcase (the test of refactoring is in a separate commit). Signed-off-by: Kir Kolyshkin <[email protected]>
Signed-off-by: Kir Kolyshkin <[email protected]>
These places should check runc exit code but they don't. Signed-off-by: Kir Kolyshkin <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
I like this better, it's also trivial to add taskset, etc. I think having a bash function named runc (instead of runc being the binary) is just confusing and it doesn't really add much. IMHO if we want such function, we should call it something like Can we use But if you or others prefers as it is in this PR now, I'm fine too :) |
I'd prefer One issue is, we can't mix bash functions and binaries together, IOW something like I'll try to come up with something better. |
I have often found when debugging test failures that successful output is quite useful -- not least of which when the failing line is |
This is the second part of tests/integration cleanup I wanted to do for quite some time.
For the first part, see #4945.
Improve runc wrapper
Add status check support (same as in bats' run helper).
Add PRE_CMD support (so we can use commands like taskset or timeout).
Drop sane_helper since the output of the command is shown in case of
an error, and we show the command itself in runc wrapper (unless -N
or ! is provided -- in this case the command is shown by bats,
together with the error). This does not show the output of successful
commands which IMO is a net positive since we are almost always
interested in failed command output only.
Use the new functionality in cpu_affinity.bats and start.bats as a
showcase (the test of refactoring is in a separate commit).
refactor to use runc status checks
add missing runc status checks